package com.activities;

import android.app.Activity;
import android.content.Intent;

public abstract class MyActivity {

	public static final int CREATE_NEW_LOG 		= 0;
	public static final int PRESENTATION	 	= 1;
	public static final int EDIT_LOG 			= 2;
	public static final int VIEW_LOG_HISTORY 	= 3;
	public static final int SHARE_LOGS 			= 4;
	public static final int SETTINGS 			= 5;
	public static final int CLOSE_APP			= 6;
    
    /**
     * Creates a new activity depending on the id passed as parameter.
     * @param int id  
     * */
    public static void onCreateNewActivity(Activity act, int id){
    	Intent i;
    	switch (id) {
    		// launch the setup activity.
			case MyActivity.SETTINGS:
	        	i = new Intent(act, Setup.class);
	        	act.startActivity(i);
	        break;
	        // launch the presentation activity
			case MyActivity.PRESENTATION:
				i = new Intent(act, Presentation.class);
				act.startActivity(i);
		    break;
		    // close the application.
	        case MyActivity.CLOSE_APP:
	        	act.finish();
	        break;
    	}
    }
    
    
	
}
